-- GENERATED SPELL FOR [Mosshide Mistweaver] --


function spell0_1009(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_1009', 0, 1)
end

function spell1_1009(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20792,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1009', 7000, 1)
end

function Sorts_1009(pUnit, Event)
local choix_sorts_1009 = math.random(0, 1)
if choix_sorts_1009 == 0 then
pUnit:RegisterEvent('spell0_1009', 1, 1)
end
if choix_sorts_1009 == 1 then
pUnit:RegisterEvent('spell1_1009', 1, 1)
end
end

function mob1009_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1009', math.random(1500, 3000), 1)
end

function mob1009_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1009_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1009_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1009, 1, 'mob1009_Action')
RegisterUnitEvent(1009, 2, 'mob1009_Leave')
RegisterUnitEvent(1009, 3, 'mob1009_Kill')
RegisterUnitEvent(1009, 4, 'mob1009_Die')
